{extend name="admin@public:layout" /}
{block name="content"}
<script type="text/javascript" src="__STATIC__/js/laydate/laydate.js"></script>
<div class="page">
  <div class="fixed-bar">
    <div class="item-title"><a class="back" href="{:url('announce/index')}" title="返回列表"><i class="icon iconfont icon-fanhui"></i></a>
      <div class="subject">
        <h3>系统公告设置 - 新增公告</h3>
        <h5>系统公告管理操作</h5>
      </div>
    </div>
  </div>
  <!-- 操作说明 -->
  <div class="explanation" id="explanation">
    <div class="title" id="checkZoom"><i class="icon iconfont icon-dengpao"></i>
      <h4 alt="提示相关设置操作时应注意的要点" class="itip">操作提示</h4>
      <span id="explanationZoom" alt="收起提示" class="itip"></span>
    </div>
    <ul>
      <li></li>
    </ul>
  </div>
  <form action="{:url('announce/add')}" method="post" class="form-horizontal">
    <div class="ncap-form-default">
      <dl class="row">
        <dt class="tit">
          <label>公告标题</label>
        </dt>
        <dd class="opt">
          <input type="text" name="announce[title]" class="input-txt">
        </dd>
      </dl>
      <dl class="row">
        <dt class="tit">
          <label>起始日期</label>
        </dt>
        <dd class="opt">
          <?php echo \util\Form::date('announce[starttime]',date('Y-m-d H:i:s'), 1);?>
        </dd>
      </dl>
      <dl class="row">
        <dt class="tit">
          <label>截止日期</label>
        </dt>
        <dd class="opt">
          <?php echo \util\Form::date('announce[endtime]','', 1);?>
        </dd>
      </dl>
      <dl class="row">
        <dt class="tit">
          <label>公告内容</label>
        </dt>
        <dd class="opt">
          <script type="text/plain" id="content" name="announce[content]"></script>
          <?php echo \util\Form::editor('content');?>
        </dd>
      </dl>
      <dl class="row">
          <dt class="tit">公告状态</dt>
          <dd class="opt">
              <div class="onoff">
                  <label for="status01" class="cb-enable  selected">通过</label>
                  <label for="status02" class="cb-disable">待审核</label>
                  <input id="status01" name='announce[passed]' checked="checked" value="1" type="radio">
                  <input id="status02" name='announce[passed]' value="0" type="radio">
              </div>
          </dd>
      </dl>
      <div class="fix-bot"><a href="JavaScript:void(0);" type="submit" class="ajax-post ncap-btn-big ncap-btn-green" target-form="form-horizontal">确认提交</a></div>
    </div>
  </form>
</div>
<script type="text/javascript">
$(function () {
  //执行一个laydate实例
  lay('.J_datetime').each(function(){
    laydate.render({
      elem: this,trigger: 'click',type: 'datetime'
    });
  });
});
</script>
{/block}
